package hn.cch.client.service;

import com.caucho.hessian.client.HessianProxyFactory;
import hn.cch.common.service.CommonService;

import java.net.MalformedURLException;

public class ClientService {

    public static void main(String[] args) {

        String url = "http://localhost:8888/hessian";

        HessianProxyFactory hessianProxyFactory = new HessianProxyFactory();
        try {
            CommonService commonService = (CommonService) hessianProxyFactory.create(url);
            System.out.println(commonService.hessian("HelloWorld"));
        } catch (MalformedURLException | ClassNotFoundException e) {
            e.printStackTrace();
        }

    }


}
